﻿<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" dir="ltr" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" dir="ltr" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" dir="ltr" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html dir="ltr" <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title>
    <?php
    wp_title( '|', true, 'right' ); 
    // Add the blog name.
	bloginfo( 'name' );
	?>
</title>

<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->

<?php wp_head(); ?>

</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed">
	<header id="branding" role="banner">
 	        <div id="top-info">
    			<a href="<?php echo home_url(); ?>">
    				<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
    			</a>
    			<div class="view-cart">
                            <a href="<?php echo jigoshop_cart::get_cart_url()?>" title="Xem giỏ hàng"><?php echo jigoshop_cart::$cart_contents_count?> sản phẩm trong giỏ hàng</a>
    			</div>
			</div>
			<nav id="access" role="navigation">
				<h3 class="assistive-text">Main menu</h3>
				<div class="skip-link"><a class="assistive-text" href="#content" title="Skip to primary content">Skip to primary content</a></div>
				<div class="skip-link"><a class="assistive-text" href="#secondary" title="Skip to secondary content">Skip to secondary content</a></div>
				<?php wp_nav_menu( array( 'theme_location' => 'top-menu', 'container_class' => 'menu' ) ); ?>
			</nav><!-- #access -->
			<div style="clear:both"></div>
			<nav id="access-small-screen" role="navigation" class="small-screen">
    			<?php wp_nav_menu( array( 'theme_location' => 'top-menu',
    			                          'container_class' => 'menu',
    			                          'walker'         => new Walker_Nav_Menu_Dropdown(),
    			                          'items_wrap'     => '<select>%3$s</select>' ) ); ?>
			</nav>
			<div style="clear:both"></div>
			<?php if ( ! is_single() ) : ?>
            <?php $brands = get_terms( 'product_tag', array( 'hierarchical' => '0' ) ); ?>
            <script type="text/javascript">
                var brands_count = <?php echo count($brands); ?>;
            </script>
            <div id="brands-slider">
                <a class="prev" id="prev-brand"></a>
                <div id="brands-slider-container">
                <?php foreach ($brands as $brand) : ?>
                    <a href="<?php echo get_term_link( $brand ); ?>"><?php if ( file_exists( get_theme_root() . '/' . strtolower( get_current_theme() ) . '/images/logo/' . strtolower( $brand->slug) . '.png' ) ) : echo '<img src="' . get_template_directory_uri() . '/images/logo/' . strtolower( $brand->slug) . '.png' . '" />'; else: echo $brand->name; endif; ?></a> 
                <?php endforeach; ?>
                </div>
                <a class="next" id="next-brand"></a>
            </div>
            <?php endif; ?>
			<?php if ( !is_home() ) : ?>
			<nav id="control" role="navigation">
            <?php
                $delimiter = '<span class="sep">//</span>';
                $wrap_before = '<div id="breadcrumb"><span class="label">' . __('You are here', 'jigoshop') . '&nbsp;&rarr;&nbsp;</span>';
                $wrap_after = '</div>';
                $before = '&nbsp;';
                $after = '&nbsp;';
                $home = 'TRANG CHỦ';
                jigoshop_breadcrumb($delimiter, $wrap_before, $wrap_after, $before, $after, $home);
            ?>
            <?php echo jigoshop_product_dropdown_categories_customize() ?>
            </nav>
			<?php endif; ?>
	</header><!-- #branding -->
	<div id="main">